<script setup lang="ts">
import { ref, watchEffect } from 'vue'

const str = ref('zs')
const num = ref(10)

watchEffect(() => {
  console.log(str.value, num.value)
})
</script>

<template>
  <div>{{ str }} <button @click="str += 's'">改str</button></div>
  <div>{{ num }} <button @click="num++">改num</button></div>
</template>

<style scoped></style>
